<template>
	<view class="tixian_list">
		<u-navbar bgColor="#fff" :placeholder="true" :fixed="true" @leftClick="$back" title="提现进度" titleStyle="{'color': '#000'}">
			
		</u-navbar>
		<view class="huibg">
			<view class="ketxt">
				本次提现进度
				<!-- <text>（总佣金：￥{{userInfo.commission}}）</text> -->
			</view>
			<view class="ketitle" :style="data_tx.status>=2?'color:#ED3232':'color:#45C4B0'">
				<text v-if="data_tx.type == 4">
					<block v-if="data_tx.status == 3">已取消</block>
					<block v-else>{{data_tx.status?(data_tx.status == 1?'已打款':'已驳回'):'审批中'}}</block>
				</text>
				<text v-else-if="data_tx.type == 5">
					{{data_tx.jie_type?'已结算入账':'未结算暂未入账'}}
				</text>
				<text v-else>
					已完成
				</text>
				
				<u-steps v-if="data_tx.status<2" :current="data_tx.status*1+1" dot="true" direction="column" stepTitleColor="#45C4B0" inactiveColor="#999999"
					activeColor="#45C4B0">
					<u-steps-item title="申请提现" :desc="data_tx.create_time | formatTime">
					</u-steps-item>
					<u-steps-item  title="您的提现已受理" :desc="data_tx.sl_time"></u-steps-item>
					<u-steps-item v-if="data_tx.status==1" title="平台已打款" :desc="data_tx.end_time"></u-steps-item>
					<!-- <u-steps-item v-if="data_tx.status==2" title="您的提现被驳回" :desc="data_tx.bh_time"></u-steps-item> -->
				</u-steps>
				
				<u-steps v-if="data_tx.status==2" :current="data_tx.status" dot="true" direction="column" stepTitleColor="#45C4B0" inactiveColor="#999999"
					activeColor="#ED3232">
					<u-steps-item title="申请提现" :desc="data_tx.create_time | formatTime"></u-steps-item>
					<u-steps-item  title="您的提现已受理" :desc="data_tx.sl_time"></u-steps-item>
					<u-steps-item v-if="data_tx.status==2" title="您的提现被驳回" :desc="data_tx.end_time"></u-steps-item>
				</u-steps>
				<u-steps v-if="data_tx.status==3" :current="data_tx.status" dot="true" direction="column" stepTitleColor="#45C4B0" inactiveColor="#999999"
					activeColor="#ED3232">
					<u-steps-item title="申请提现" :desc="data_tx.create_time | formatTime"></u-steps-item>
					<u-steps-item  title="您的提现已受理" :desc="data_tx.sl_time"></u-steps-item>
					<u-steps-item v-if="data_tx.status==3" title="您的提现已取消" :desc="data_tx.end_time"></u-steps-item>
				</u-steps>
				<!-- <text v-if="data_tx.status==0">审批中</text>
				<text v-if="data_tx.status==1">已打款</text>
				<text v-if="data_tx.status==2">打款失败({{data_tx.status_msg}})</text>
				<text v-if="data_tx.status==3">已取消</text> -->
			</view>
			<view class="img">
				<image :src="'/images/m_r.png' | formatImgUrl" ></image>
				<view @click="$go('/pages/user/bill?type=1')" class="txts">
					提现记录 >
				</view>
			</view>
		</view>
		
		<view class="con">
			<view class="tp">
				<view>提现申请</view>	
			</view>
			
			<view class="line bor" v-if="data_tx.pay_type">
				<view>
					提现方式：
				</view>
				<view>
					&nbsp;&nbsp;
					<text v-if="data_tx.pay_type==1">银行卡提现</text>
					<text v-if="data_tx.pay_type==2">微信提现</text>
					<text v-if="data_tx.pay_type==3">支付宝提现</text>
				</view>
			</view>
			
			<view class="line">
				<view>
					提现金额：
				</view>
				<view>
					&nbsp;&nbsp;
					{{data_tx.price || ''}}
				</view>
			</view>
			<view class="line"  v-if="data_tx.pay_type==1">
				<view>
					开户行
				</view>
				<view>
					&nbsp;&nbsp;{{pay_info.bank_name || ''}}
				</view>
			</view>
			<view class="line" v-if="pay_info">
				<view>
					<text v-if="data_tx.pay_type==1">银行卡卡号</text>
					<text v-if="data_tx.pay_type==2">微信提帐号</text>
					<text v-if="data_tx.pay_type==3">支付宝帐号</text>
					：
				</view>
				<view>
					&nbsp;&nbsp;{{pay_info.bank_number || ''}}
				</view>
			</view>
			<view class="line" v-if="pay_info">
				<view>
					绑定人姓名：
				</view>
				<view>
					&nbsp;&nbsp;{{pay_info.name || ''}}
				</view>
			</view>
			<view class="line">
				<view>
					提现日期：
				</view>
				<view>
					&nbsp;&nbsp;{{data_tx.create_time | formatTime}}
				</view>
			</view>
			<view class="line" v-if="data_tx.yuji_time">
				<view>
					预计打款：
				</view>
				<view>
					&nbsp;&nbsp;{{data_tx.yuji_time || ''}}
				</view>
			</view>
		<!-- 	<view class="line">
				<view>
					预计打款：
				</view>
				<view>
					&nbsp;&nbsp;支付宝提现
				</view>
			</view> -->
			
			<view class="line">
				<view>
					当前状态：
				</view>
				<view>
					&nbsp;&nbsp;
					<text v-if="data_tx.status==0">审批中</text>
					<text v-if="data_tx.status==1">已打款</text>
					<text v-if="data_tx.status==2">打款失败({{data_tx.status_msg}})</text>
					<text v-if="data_tx.status==3">已取消</text>
				</view>
			</view>
		</view>

			<view class="bom">
				<text>
					如需调整提现金额，请点击“取消订单”重新进行提现操作。
				</text>
			</view>

	
		
		<view class="wrap" v-if="data_tx.status==0">
			<view class="tixian" @click="submit">
				取消提现
			</view>
		</view>
	
	</view>
</template>
<script>
	export default {
		data() {
			return {
				id:0,
				data_tx:null,
				pay_info:null,
			}
		},
		onLoad(ops) {
			
			this.id = ops.id || ''
			this.getinfo();
		},
		methods: {
			submit(){
				let _this = this;
				this.$api.default.request('user/financeDea_qr', {id:_this.id}, 'POST', false).then((res) => {
					_this.$common.errorToShow(res.msg)
					if (res.code) {
						// _this.getinfo();
						uni.navigateBack()
					}
				})
			},
			getinfo(){
				let _this = this;
				this.$api.default.request('user/financeDea', {id:_this.id}, 'POST', false).then((res) => {
					if (res.code) {
						_this.data_tx = res.data
						_this.pay_info = JSON.parse(res.data.pay_info);
					
					}
				})
			}
			
		}
	}
</script>

<style lang="scss">


	.tixian_list {
		height:100vh;
		background: #f2f5f2;
		.huibg {
			background: #fff;
			padding: 40rpx 30rpx 10rpx;
			border-top: 1rpx solid rgba(242, 245, 242, 1);
			.img{
				position: absolute;
				right:0rpx;
				top:0rpx;
				image{
					height: 160rpx;
					width: 220rpx;
				}
				.txts{
					font-size: 26rpx;
					position:relative;
					left:70rpx;
					top:-120rpx;
					color: #45C4B0;
				}
			}
			.ketxt {
				font-size: 32rpx;
				font-weight: 700;
				
				letter-spacing: 0em;
				color: #3D3D3D;
				line-height: 40rpx;
				text{
					color: #999999;
				}
			}

			.ketitle {
				font-size: 56rpx;
				font-weight: bold;
				letter-spacing: 0em;
				color:#45C4B0;
				padding-bottom: 20rpx;
			}

			
		}
		.bom{
			width: 100%;
			text-align: center;
			color: #999;
			font-size: 24rpx;
			margin-top: 16rpx;
			float: left;
		}
		.con{
			padding-bottom: 30rpx;
			width: 100%;
			background: #fff;
			margin-top: 20rpx;
			float: left;
			.tp{
				color: #3d3d3d;
				padding-top: 30rpx;
				width: 90%;
				margin-left: 5%;
				height: 30px;
				font-weight: 700;
				font-size: 34rpx;
				view{
					float: left;
				}
			}
			.bor{
				border-top:1px solid rgba(153, 153, 153, 0.1);
			}
			
			.line{
				margin-top: 10rpx;
				padding-top: 20rpx;
				background: #fff;
				width: 90%;
				margin-left: 5%;
				float: left;
				
				
				view{
					color: #999;
					float: left;
					&:first-child{
						width: 35%;
						text-align: right;
					}
					&:last-child{
						color: #3d3d3d;
					}
				}
				
			}
		}
			
		.wrap {
			position: fixed;
			bottom: 0px;
			width: 100%;
			background: #fff;
			height: 160rpx;
		
			.tixian {
				width: 630rpx;
				height: 86rpx;
				border-radius: 8px;
				opacity: 1;
				background: #45C4B0;
				text-align: center;
				margin: 0 auto;
				margin-top:20rpx;
				font-size: 32rpx;
				font-weight: bold;
				letter-spacing: 0em;
				color: #FFFFFF;
				line-height: 86rpx;
			
			}
		}

	}
</style>